package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Main {

    public static void main(String[] args) {
        List<LibraryBook> bookList = new ArrayList<LibraryBook>();
        bookList.add(new LibraryBook("The Wizard of Oz"));
        bookList.add(new LibraryBook("Hunger Games"));
        bookList.add(new LibraryBook("Ender's Game"));
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

        Map<String, String> options = new HashMap<String, String>();
        options.put("1","1 - List available books");
        options.put("2","2 - Checkout A Book");


        CheckoutBookCommand checkoutCommand = new CheckoutBookCommand(System.out, bufferedReader, bookList);

        ListBookCommand listBookCommand = new ListBookCommand(System.out, bookList);
        new Biblioteca(System.out, "Welcome to Biblioteca!", bookList, options, bufferedReader, checkoutCommand, listBookCommand).run();
    }
}
